import { createRouter, createWebHistory } from "@ionic/vue-router";
import { RouteRecordRaw } from "vue-router";
import Main from "@/views/Main.vue";
// import Com from 'vue';

const routes: Array<RouteRecordRaw> = [
  // {
  //   path: '/',
  //   redirect: '/home'
  // },
  // {
  //   path: '/home',
  //   name: 'Home',
  //   component: HomePage
  // },
  {
    path: "/",
    name: "home",
    component: () => import("@/views/Login.vue"),
  },
  {
    path: "/register",
    name: "about",
    // route level code-splitting
    // this generates a separate chunk (About.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import("../views/Register.vue"),
  },
  {
    path: "/main",
    component: Main,
  },
  {
    path: "/clock",
    component: () => import("../views/Clock.vue"),
  },
  {
    path: "/user",
    component: () => import("../views/User.vue"),
  },
  {
    path: "/setting",
    component: () => import("../views/Setting.vue"),
  },
  {
    path:"/table",
    component: ()=>import("../views/Table.vue"),
  },
  {
    path:"/kanban",
    component: ()=>import("../views/Kanban.vue"),
  }
];

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes,
});

export default router;
